/**
 * AOV图的拓扑排序
 * 
 */

#include<stdio.h>
#include<stdlib.h>

typedef struct GRAPH
{
    char* vexs;
    int** arcs;
    int vexNum;
    int arcNum;
}Graph;

typedef struct NODE{
    int data;
    struct NODE* next;
}Node;

// https://blog.csdn.net/m0_74000825/article/details/135004907

int main(void){
    Graph *g=initGraph(6);
    int * flag=(int*)malloc(sizeof(int)*g->vexNum);
    for(int i=0;i<g->vexNum;i++){
        flag[i]=0;
    }
    int arcs[6][6]={
        0,1,1,1,0,0,
        0,0,0,0,0,0,
        0,1,0,0,1,0,
        0,0,0,0,1,0,
        0,0,0,0,0,0,
        0,0,0,1,1,0
    };
    greateGraph(g,"123456",(int*)arcs);
    DFS(g,flag,0);
    printf("\n");
    topologicalSort(g);
}